package action.system;

import java.io.IOException;
import java.util.List;

import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.ParentPackage;

import com.fasterxml.jackson.core.JsonProcessingException;

import action.BaseAction;
import domain.dto.system.AuthrizationTreeDto;
import service.system.ActionService;
@ParentPackage("authorityInterceptor")
public class ActionAction extends BaseAction {

	 @Action(value = "getActionTree")
	  public String getActionTree() throws JsonProcessingException, IOException
      {
		  List<AuthrizationTreeDto> ret = ActionService.getActionTreeByRole(request.getParameter("id"));
          responseContent(jackson.writeValueAsString(ret));
          return null;
      }
}
